package com.gc.server.dao;

import com.gc.server.entity.BusApplyEntity;
import com.gc.server.vo.ApplyUserVo;
import com.gc.server.vo.BusApplyVo;
import org.apache.ibatis.annotations.Mapper;
import com.yf.dao.BaseDao;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * 申请Dao
 *
 * @author hxf
 * @email 505860922@qq.com
 * @date Wed Apr 08 09:33:59 CST 2020
 */
@Mapper
public interface BusApplyDao extends BaseDao<BusApplyEntity> {


    List<BusApplyVo> queryListVo(BusApplyVo busApplyVo);

    BusApplyVo getVo(Long id);


    List<ApplyUserVo> findMyShopUser(Long userId);

    List<ApplyUserVo> findByUser(Long userId);

    List<ApplyUserVo> findMyShopUserAndDate(@Param("topUserId") Long topUserId, @Param("userId") Long userId, @Param("startDate") Date startDate, @Param("endDate") Date endDate);

    List<ApplyUserVo> findByUserAndDate(@Param("userId") Long userId, @Param("startDate") Date startDate, @Param("endDate") Date endDate);

    Integer sumCheck(@Param("userId") Long userId, @Param("status") Integer status, @Param("type") Integer type);

    List<BusApplyEntity> findByAid(Long id);
}
